package ac.il.technion.cs236635.project.core;

import javax.jws.WebMethod;
import javax.jws.WebService;

import org.apache.log4j.Logger;

import ac.il.technion.cs236635.project.core.server.ServerJob;

@WebService
public class ResultListener {

	private Logger log = Logger.getLogger( ResultListener.class);
	
	@WebMethod(operationName="jobIsReady")
	public void jobIsReady( final ServerJob job) {
		JobsKeeper.getInstance().deleteJob( job.getJobId( ));
		log.info( "FINISHED: Job with id: " + job.getJobId() + " has finished, task performed inside " + job.getJobType( ).toString( ));
	}
	
}
